<div class="wrapper wrapper-content animated fadeInRight">
    <!-- PAGE CONTENT BEGINS -->
    <div class="row">
        <div class="col-xs-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>搜索</h5>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="table-responsive">
                            <form class="form-search" method="get" action="<?=url('nongjialegw.room/index')?>"
                                  role="form">
                                <table>
                                    <tr>
                                        <td>房间标题:<input class="form-control" name="title" id="title" value="<?=$search['title']?>" type="text" placeholder="请输入房间标题" style=" width:200px"/></td>
                                        <td>
                                            <div class="input-group">
                                                <button type="submit" style="margin-top: 42%"
                                                        class="btn form-control btn-sm btn-primary">
                                                    搜索
                                                </button>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="ibox-content">
                <div class="row">
                    <div class="tableTools-container">
                        <a title="添加房间管理" href="<?=url('nongjialegw.room/create')?>" class="btn btn-sm btn-success"><i class=" fa fa-plus"></i>添加房间管理</a>
                    </div>
                    <div class="table-responsive">
                        <table id="simple-table" class="table table-striped">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>房间标题</th>
                                <th>面积</th>
                                <th>图片</th>
                                <th>价格</th>
                                <th>单日最大预定数</th>
                                <th>是否有WIFI</th>
                                <th>上线</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <form id="mini_list">
                                <tbody>
                                <?php foreach($list as $val){ ?>
                                <tr>
                                    <td><?= $val->room_id ?></td>
                                    <td><?=$val->title?></td>
                                    <td><?=$val->area?></td>
                                    <td><img width="50" src="/attachs/uploads/<?=$val->photo?>"/></td>
                                    <td>￥<?=sprintf("%.2f",$val->price/100)?></td>
                                    <td><?=$val->day_num ?></td>
                                    <td><?=$val->is_wifi == 1 ? '<span class="label label-primary">是</span>' : '<span class="label label-warning">否</span>'?></td>
                                    <td><?=$val->is_online  == 1 ? '<span class="label label-primary">是</span>' : '<span class="label label-warning">否</span>'?></td>
                                    <td>
                                        <div class="hidden-sm hidden-xs btn-group">
                                            <a title="编辑房间管理" href="<?=url('nongjialegw.room/edit','room_id='.$val->room_id)?>" class="btn btn-xs btn-info"><i class=" fa fa-edit bigger-120"></i>编辑</a>
                                            <a title="编辑房间管理" mini="act" href="<?=url('nongjialegw.room/online','room_id='.$val->room_id)?>" class="btn btn-xs btn-info"><i class=" fa fa-edit bigger-120"></i><?=$val->is_online == 1 ? '下架房间' : '上架房间'?></a>
                                            <a title="删除房间管理" mini="act" href="<?=url('nongjialegw.room/delete','room_id='.$val->room_id)?>" class="btn btn-xs btn-warning"><i class="fa fa-trash bigger-120"></i>删除</a>
                                        </div>
                                    </td>
                                </tr>
                                <?php } ?>
                                </tbody>
                            </form>
                        </table>
                        <div>
                            <?php echo $page; ?>
                        </div>
                    </div><!-- /.row -->
                </div><!-- /.main-container -->
            </div>
        </div>
    </div>
</div>
